package com.geek.demo01.controller;

import com.geek.demo01.exception.ErrorType;
import com.geek.demo01.exception.ServiceException;
import com.geek.demo01.model.UserBO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @ClassName UserController
 * @Description TODO
 * @Author zzm
 * @Data 2020/10/20 9:21
 * @Version 1.0
 */
@RestController
public class UserController {
    @PostMapping("/user")
    public void update(@RequestBody @Valid UserBO userBO) {
        throw new ServiceException(ErrorType.BOOK_NOT_FOUND);
    }
}
